home *** CD-ROM | disk | FTP | other *** search
/ Power Programmierung / Power-Programmierung (Tewi)(1994).iso / magazine / dbms_mag / 9101 / desq4.jan < prev    next >
Text File  |  1990-11-09  |  1KB  |  48 lines

  1.  
  2.  
  3. Listing 4
  4.  
  5.  
  6. * The index server inititalizes mail as follows:
  7.  
  8. * Define constant for status code that means end
  9.      TERMINATE      = 99
  10.      PROCEED        = 10
  11.      ABORT               = 88
  12.  
  13. *Obtain the handle for the mailbox:
  14.      MalNTX = MAL_Me()
  15. * Name the mailbox:
  16.      MAL_Name(MalNTX, "Index Server")
  17.  
  18. * Check Mail Queue:
  19.      DO WHILE StatCode <> TERMINATE
  20.      * Are there messages on the queue?
  21.           IF MAL_SizeOf(MalNTX) > 0
  22.           * Obtain message
  23.                Message = MAL_Readc(MalNTX)
  24.           * Obtain status code of last MAL_Readc()
  25.                StatCode = MAL_Status(MalNTX)
  26.  
  27.           * Branch for each status code:
  28.                DO CASE
  29.                CASE StatCode = PROCEED
  30.           * Parse the incoming message
  31.           * Separate clauses between !
  32.           * Using FUNCky STRextract
  33.           * USE (clause1)
  34.           * INDEX ON &clause2 TO (clause3)
  35.                CASE StatCode = ABORT
  36.           * Use your imagination
  37.                ENDCASE
  38.           ENDIF
  39.      API_Pause()
  40. ENDDO
  41. Win_AtSay(WIN_Me(), 0,0, "Ending this task")
  42. API_Exit()
  43. RETURN
  44.  
  45.  
  46.  
  47.  
  48.